package jxl;

import java.io.File;

import jxl.write.WritableHyperlink;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;

public class CA {

	public static void main(String[] args) {
		try {
			WritableWorkbook wb = Workbook.createWorkbook(new File("D:/python/test.xls"));
			WritableSheet ws = wb.getSheet("table");
			Sheet sheet = wb.getSheet("table");
			for (int i = 1; i < sheet.getRows(); i++) {
				String cellinfo = sheet.getCell(0, i).getContents();
				ws.addHyperlink(new WritableHyperlink(0, i, cellinfo, wb.getSheet(cellinfo), 0, 0)); // 关键的建立后面sheet连接的一句
			}
			wb.write();
			wb.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
